import request from "@/lib/request";
import {API} from "@/api/typings";

/** getQuestionBankByPage POST /questionBank/page */
export async function getQuestionBankByPageUsingPost(
  body: API.QuestionBankQueryRequest,
  options?: { [key: string]: any },
): Promise<API.BasePageResponse<API.QuestionBankVO>> {
  return request("/questionBank/page", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** getUserQuestionBankVoByPageUsingPost POST /questionBank/page/vo */
export async function getUserQuestionBankVoByPageUsingPost(
  body: API.QuestionBankQueryRequest,
  options?: { [key: string]: any },
): Promise<API.BasePageResponse<API.QuestionBankVO>> {
  return request("/questionBank/page/vo", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** getQuestionBankVoByPageUsingPost POST /questionBank/page/allVo */
export async function getQuestionBankVoByPageUsingPost(
  body: API.QuestionBankQueryRequest,
  options?: { [key: string]: any },
): Promise<API.BasePageResponse<API.QuestionBankVO>> {
  return request("/questionBank/page/allVo", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** updateQuestionBank POST /questionBank/update */
export async function updateQuestionBankUsingPost(
  body: API.QuestionBankUpdateRequest,
  options?: { [key: string]: any },
): Promise<API.BaseResponse<boolean>> {
  return request("/questionBank/update", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** addQuestionBank POST /questionBank/add */
export async function addQuestionBankUsingPost(
  body: API.QuestionBankAddRequest,
  options?: { [key: string]: any },
): Promise<API.BaseResponse<Boolean>> {
  return request("/questionBank/add", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteUser GET /questionBank/remove */
export async function deleteQuestionBankUsingGet(
  params: API.BaseParamsID,
  options?: { [key: string]: any },
): Promise<API.BaseResponse<Boolean>> {
  return request("/questionBank/remove", {
    method: "GET",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** getQuestionBankVoWithSimpleById GET /questionBank/detail/simple */
export async function getQuestionBankVoWithSimpleByIdUsingGet(
  params: API.BaseParamsID,
  options?: { [key: string]: any },
): Promise<API.BaseResponse<API.QuestionBankVO>> {
  return request("/questionBank/detail/simple", {
    method: "GET",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** getQuestionBankById GET /questionBank/get */
export async function getQuestionBankByIdUsingGet(
  params: API.BaseParamsID,
  options?: { [key: string]: any },
): Promise<API.BaseResponse<API.QuestionBankVO>> {
  return request("/questionBank/get", {
    method: "GET",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
